Exercise: Parameters of an FID Signal
In this exercise, we will find the optimized parameters of a raw FID signal.
We'll cover the following
Task#
In Fourier transform nuclear magnetic resonance spectroscopy, free induction decay (FID) is the observable Nuclear Magnetic Resonance (NMR) signal generated by non-equilibrium nuclear spin magnetization precessing about the magnetic field. The signal has decayed oscillations and is defined by the equation:
Decay curves are given by the equation:
and
In this exercise, you are given raw data directly from an NMR system and will fit the curve to reduce RMSE and find the unknown coefficients: and .
Problem statement#
The raw data is stored in the variable data and its corresponding time data is stored in the variable time. The numpy module has already been imported as np.
Use data, time and the equation of the FID signal to find the unknown coefficients and and plot the fitted curve.
Keep in mind that you might need to alter the initial guesses for the fitting to work. Click below if you need a head start.
You can use the RMSE utility function to calculate and minimize the root mean square error.
Also, plot the decay curves with linetype = '--' and linewidth = 3 .
The figure and axis configuration have been given to you to for a better visualization.
The solution to this exercise will be discussed in the next lesson.
Solution Review: Triple Integral Over a Bounded Region
Solution Review: Parameters of an FID Signal